import request from '@/utils/request'

// 获取设备列表
export function getDeviceList() {
  return request({
    url: '/device/getDeviceList',
    method: 'get'
  })
}

// 获取设备运行数据
export function getDeviceRuntimeDataById(deviceId) {
  return request({
    url: `/device/getDeviceRuntimeDataById/${deviceId}`,
    method: 'get'
  })
}

// 添加设备
export function addDevice(deviceInfo) {
  return request({
    url: '/device/addDevice',
    method: 'post',
    data: deviceInfo
  })
}

// 删除设备
export function delDevice(deviceId) {
  return request({
    url: `/device/deleteDevice/${deviceId}`,
    method: 'delete'
  })
}
